package CountVertex;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;

public class CountVertexMapper extends MapReduceBase implements
		Mapper<Text, Text, Text, LongWritable> {
	@Override
	public void map(Text key, Text value,
			OutputCollector<Text, LongWritable> output, Reporter reporter)
			throws IOException {
		output.collect(new Text("Vertex: "),
				new LongWritable(Long.parseLong(key.toString())));
		output.collect(new Text("Vertex: "),
				new LongWritable(Long.parseLong(value.toString())));
	}
}
